package com.yuliang.utils.DistributedLock;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Configuration;
import org.springframework.data.redis.core.RedisTemplate;

/**
 * @author Huangkai
 */
@Configuration
public class RedisLockClient {

    @Autowired
    private RedisTemplate redisTemplate;


    public Lock getLock(String name) {
        return new DistributedLock(name, redisTemplate);
    }
}
